home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 32 / biomrf.zip / BP2.INC < prev    next >
Text File  |  1988-05-12  |  2KB  |  80 lines

  1.  
  2. SUB BP2(posns%(2),biomorphs%(2),bio%)
  3.  
  4. local presntbase%,oldbase%,itn%
  5.  
  6.     x% = 320
  7.     reflec% = 320
  8.     y% = 125
  9.  
  10.     locate 1,1
  11.     input"What magnification do you want ";magn
  12.     
  13.     line (x%,y%)-(x%,(y%-(magn * biomorphs%(bio%,8))))
  14.     
  15.     posns%(1,1) = x% : posns%(1,2) = y%
  16.         posns%(1,3) = biomorphs%(bio%,8) * magn
  17.     
  18.     posns%(2,2) = (y%-(magn * biomorphs%(bio%,8))) : posns%(2,1) = x%
  19.  
  20.     if biomorphs%(bio%,5)/2 = int(biomorphs%(bio%,5)/2) then
  21.         posns%(2,3) = magn * (biomorphs%(bio%,3) + biomorphs%(bio%,4))
  22.     else
  23.         posns%(2,3) = magn * (biomorphs%(bio%,3) * biomorphs%(bio%,4))
  24.     end if
  25.  
  26.     posns%(2,4) = biomorphs%(bio%,6)
  27.     presntbase% = 2
  28.     
  29.     call vectorplot(posns%(),reflec%,presntbase%)
  30.     
  31.     oldbase% = 2
  32.     
  33.     for itn% = 1 to biomorphs%(bio%,2)
  34.         presntbase% = 2^itn% + 1
  35.         count% = presntbase%
  36.     
  37.         for vector% = oldbase% to (presntbase%-1)
  38.             xroot% = posns%(vector%,1) - posns%(vector%,3)*sin(posns%(vector%,4)/6.28319)
  39.             yroot% = posns%(vector%,2) + posns%(vector%,3)*cos(posns%(vector%,4)/6.28319)
  40.             posns%(count%,1) = xroot%
  41.             posns%(count%,2) = yroot%
  42.  
  43.             if biomorphs%(bio%,5)/2 = int(biomorphs%(bio%,5)/2) then
  44.                 posns%(count%,3) = magn*(biomorphs%(bio%,3)+biomorphs%(bio%,4))
  45.             else
  46.                 posns%(count%,3) = magn*(biomorphs%(bio%,3)*biomorphs%(bio%,4))
  47.             end if
  48.  
  49.             posns%(count%,4) = biomorphs%(bio%,6)    
  50.     
  51.             call vectorplot(posns%(),reflec%,count%)
  52.     
  53.             count% = count% + 1
  54.             posns%(count%,1) = xroot%
  55.             posns%(count%,2) = yroot%
  56.             
  57.             if biomorphs%(bio%,5)/2 = int(biomorphs%(bio%,5)/2) then
  58.                 posns%(count%,3) = magn*(biomorphs%(bio%,3)+biomorphs%(bio%,4))
  59.             else
  60.                 posns%(count%,3) = magn*(biomorphs%(bio%,3)*biomorphs%(bio%,4))
  61.             end if
  62.  
  63.             posns%(count%,4) = biomorphs%(bio%,7) - biomorphs%(bio%,6)
  64.     
  65.             call vectorplot(posns%(),reflec%,count%)
  66.             
  67.             count% = count%+1
  68.     
  69.         next vector%
  70.     
  71.         oldbase% = presntbase%
  72.     next itn%
  73.     
  74. locate 12,1
  75. print"Biomorph gene values:"
  76. for itn% = 1 to 8
  77.     print itn%;" : ";biomorphs%(bio%,itn%)
  78. next itn%
  79.  
  80. end sub